package com.mbti.youmore.service;

import com.mbti.youmore.entity.History;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
* @author Guqier
* @description 针对表【t_history】的数据库操作Service
* @createDate 2024-05-08 20:30:45
*/
public interface HistoryService extends IService<History> {

    @Transactional
    int addHistory(int postId, int userId);

    List<Map<String, Object>> selectHistoryByUerId(int userId);

    @Transactional
    int deleteAllHistoryById(int userId);

    int deleteHistoryById(int id, int userId);
}
